<? include ("../init.php") ?>
<? include ("../header.php") ?>
<? include ("../menu.php") ?>
<? include ("submenu.php") ?>

<?php
  $sql = 'SELECT * FROM product_cat ORDER BY product_cat_name';
  $rss = $db->query($sql);
  $select_cat = '<select name = "catalogue" class = "nput size1" >';
  while ($line2 = $db->fetchNextObject($rss)){
    $select_cat .= "<option value = '".$line2->product_cat_id."'>".$line2->product_cat_name."</option>";
  }
  $select_cat .= "</select>";
?>

<div id = "body">

<h1>+<?_l('add-product-set')?></h1>
<div class = "clear"></div>


<form method="post" action="add_set.php" class = "form" enctype="multipart/form-data">
  <div class = "field"><label><?_l('catalogue')?></label><?php echo $select_cat; ?></div>
  <div class = "field"><label><?_l('name')?></label><input type = "text" name = "name" class = "input size1" ></div>
  <div class = "field"><label><?_l('image')?></label><input type = "file" name = "img" class = "input size1" ></div>
  <hr>
  <div class = "field"><label></label><input type = "submit" value = "<?=__l('add')?>" class = "btn">&nbsp;<a href = "#" class = "btn" onclick="javascript:history.back(1)"><?_l('cancel')?></a></div>
</form>

</div>

<style>
  .form label {
    width:80px;
  }
</style>
<script>
  $(document).ready(function(){
    $('#datepicker').datepicker({
      dateFormat: 'yy-mm-dd',
      changeMonth: true,
      changeYear: true
    });
  });
</script>
</div>
<? include "../footer.php" ?>